<?php
namespace Seller\Model;
use Think\Model\RelationModel;
class AttrModel extends RelationModel{
    protected $_link = array(
        'model'=>array(
            'mapping_type' => self::BELONGS_TO,
            'class_name' => 'Model',
            'foreign_key' => 'model_id',
            'mapping_fields' => 'm_name',
            'as_fields' => 'm_name'
        ),

        'vals'=>array(
            'mapping_type' => self::HAS_MANY,
            'class_name' => 'AttrVal',
            'foreign_key' => 'attr_id',
        )

    );





}